package com.hl.order.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hl.order.mapper.UserRewardWithdrawMapper;
import com.hl.order.domain.UserRewardWithdraw;
import com.hl.order.service.IUserRewardWithdrawService;

/**
 * 用户奖励金提现记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-11
 */
@Service
public class UserRewardWithdrawServiceImpl implements IUserRewardWithdrawService 
{
    @Autowired
    private UserRewardWithdrawMapper userRewardWithdrawMapper;

    /**
     * 查询用户奖励金提现记录
     * 
     * @param id 用户奖励金提现记录主键
     * @return 用户奖励金提现记录
     */
    @Override
    public UserRewardWithdraw selectUserRewardWithdrawById(Long id)
    {
        return userRewardWithdrawMapper.selectUserRewardWithdrawById(id);
    }

    /**
     * 查询用户奖励金提现记录列表
     * 
     * @param userRewardWithdraw 用户奖励金提现记录
     * @return 用户奖励金提现记录
     */
    @Override
    public List<UserRewardWithdraw> selectUserRewardWithdrawList(UserRewardWithdraw userRewardWithdraw)
    {
        return userRewardWithdrawMapper.selectUserRewardWithdrawList(userRewardWithdraw);
    }

    /**
     * 新增用户奖励金提现记录
     * 
     * @param userRewardWithdraw 用户奖励金提现记录
     * @return 结果
     */
    @Override
    public int insertUserRewardWithdraw(UserRewardWithdraw userRewardWithdraw)
    {
        userRewardWithdraw.setCreateTime(DateUtils.getNowDate());
        return userRewardWithdrawMapper.insertUserRewardWithdraw(userRewardWithdraw);
    }

    /**
     * 修改用户奖励金提现记录
     * 
     * @param userRewardWithdraw 用户奖励金提现记录
     * @return 结果
     */
    @Override
    public int updateUserRewardWithdraw(UserRewardWithdraw userRewardWithdraw)
    {
        userRewardWithdraw.setUpdateTime(DateUtils.getNowDate());
        return userRewardWithdrawMapper.updateUserRewardWithdraw(userRewardWithdraw);
    }

    /**
     * 批量删除用户奖励金提现记录
     * 
     * @param ids 需要删除的用户奖励金提现记录主键
     * @return 结果
     */
    @Override
    public int deleteUserRewardWithdrawByIds(Long[] ids)
    {
        return userRewardWithdrawMapper.deleteUserRewardWithdrawByIds(ids);
    }

    /**
     * 删除用户奖励金提现记录信息
     * 
     * @param id 用户奖励金提现记录主键
     * @return 结果
     */
    @Override
    public int deleteUserRewardWithdrawById(Long id)
    {
        return userRewardWithdrawMapper.deleteUserRewardWithdrawById(id);
    }
}
